import Vue from 'vue'
import VueRouter from 'vue-router';

Vue.use(VueRouter)

// 初始路由 ，登录和404界面，其他界面通过 router.addRoutes(routes)

const routes = [
    {
        path: '/login', name: 'login',
        component: (resolve) => require(['../login'], resolve)
    },
    {
        path: '/404',
        name: '404',
        component: (resolve) => require(['../404'], resolve)
    },
]

export default new VueRouter({
    mode: 'history',
    routes // (缩写) 相当于 routes: routes
})